import request from "../utils/request";
import qs from "qs";
/**
 *
 * @param {查询组态} params
 * @returns
 */

export function getConfiguration(params) {
    return request({
        url: "/configuration/listHeatConfiguration",
        method: "post",
        params,
    });
}

/**
 *
 * @param {根据标识查询组态信息} params
 * @returns
 */
export function getConfigurationContent(params) {
    return request({
        url: "/configuration/getConfigurationId",
        method: "post",
        params,
    });
}

/**
 *
 * @param {添加组态} params
 * @returns
 */

export function addConfiguration(params) {
    return request({
        url: "/configuration/addConfiguration",
        method: "post",
        data: qs.stringify(params),
    });
}

/**
 *
 * @param {编辑组态} params
 * @returns
 */
export function editConfiguration(params) {
    return request({
        url: "/configuration/updateConfiguration",
        method: "post",
        data: qs.stringify(params),
    });
}

/**
 *
 * @param {删除组态} params
 * @returns
 */
export function delConfiguration(params) {
    return request({
        url: "/configuration/delConfiguration",
        method: "post",
        params,
    });
}

/**
 * 批量查询数据点值
 */

export function getRealDataAnds(params) {
    return request({
        url: "/realdata/listDataCodeBatch",
        method: "post",
        params,
    });
}